package com.example.myapplication;

import android.content.Intent;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

public class MainActivity2 extends AppCompatActivity {

    private TextView t1 ;
    private TextView t2 ;
    private TextView t3 ;
    private Button btn ;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        Intent intent = getIntent() ;
        String phone = intent.getStringExtra("手机号");
        String yanzhnema = intent.getStringExtra("验证码");
        String password = intent.getStringExtra("密码");

        t1 = findViewById(R.id.textView1_1) ;
        t2 = findViewById(R.id.textView2_2) ;
        t3 = findViewById(R.id.textView3_3) ;
        btn = findViewById(R.id.button) ;

        t1.setText(phone);
        t2.setText(yanzhnema);
        t3.setText(password);

        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(MainActivity2.this,MainActivity.class) ;
                startActivity(intent);
            }
        });

    }
}